package cn.afactory.tygz.model;

import org.json.JSONException;
import org.json.JSONObject;

import java.io.Serializable;

/**
 * Created by xi on 15/10/11.
 */
public class MoneyDetail implements Serializable {

    public long addTime;
    public String name;
    public int money;

    public static MoneyDetail deserialize(JSONObject json) throws JSONException {
        if (json != null && json != JSONObject.NULL && json.length() > 0) {
            MoneyDetail result = new MoneyDetail();



            result.name = json.getString("name");
            result.addTime = json.getLong("addTime");
            result.money = json.getInt("money");


            return result;
        }
        return null;
    }



}
